﻿using PostSharp.Aspects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Services.Aspects
{
    [Serializable]
    public class DeleteCacheAttribute : CacheActionAttribute
    {
        public override void OnInvoke(MethodInterceptionArgs args)
        {
            string key = GetCacheKey(args);
            cacheStorage.Remove(key);
            args.Proceed();
        }
    }
}
